package com.cll.netty.netty.dubborpc.customer;

import com.cll.netty.netty.dubborpc.netty.NettyClient;
import com.cll.netty.netty.dubborpc.publicinterface.HelloService;

public class ClientBootstrap {
    // 这里定义协议头
    public static final String providerName = "HelloService#hello#";

    public static void main(String[] args) {
        try {
            int count = 0;
            for (;;) {
                NettyClient customer = new NettyClient();
                HelloService service = (HelloService) customer.getBean(HelloService.class, providerName);
                String res = service.hello("你好 " + (++count));
                System.out.println("调用结果res=" + res);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
